public class ca {
    public static void main(String[] args) {
        int[] arr = new int[]{1,5,6,0,7,4,9,3};
        int[] index = new int[]{0,1,2,3,4,0,5,1,2,6,7};
        String s="";
        for (int i : index) {
            System.out.println(i);
            s+=arr[i];
        }
        System.out.println(s);
    }
}
